<template>
  <div class="info-box bg">
    <!--   标题区域   -->
    <div class="header">设备信息</div>
    <!-- 内容区域 -->
    <div class="info-content">
      <vue-seamless-scroll
        :class-option="classOption"
        :data="infoData"
        class="seamless-warp"
      >
        <div v-for="(item, index) in infoData" :key="index" class=" eventBox">
          <div class="header-box flex flex-a-c flex-j-s-b">
            <div class="header-left">
              <span>设备名称</span>/ <span>铣床</span>/
              <span>303857658393</span>
            </div>
            <div class="header-right">运行</div>
          </div>
          <!--     内容区域      -->
          <div class="flex flex-a-c content-box">
            <img alt="" src="@images/defaultImg.png" />
            <div class="content-right">
              <div>G代码名称：轴承A</div>
              <div class="flex flex-a-c ">
                工件进度：
                <div class="progress">
                  <a-progress
                    strokeColor="#1A5EFF"
                    :percent="50"
                    status="active"
                  />
                </div>
                <div class="col-box">124/600&nbsp;</div>
                行
              </div>
              <div>工件个数：100件</div>
            </div>
          </div>
        </div>
      </vue-seamless-scroll>
    </div>
  </div>
</template>

<script>
import vueSeamlessScroll from "vue-seamless-scroll";

export default {
  name: "index",
  components: {
    vueSeamlessScroll
  },
  data() {
    return {
      infoData: [1, 2, 3, 4, 5],
      backColor: ["#00B429", "#FF3535", "#FBC225", "#7C8CA5"] // 背景色配置项
    };
  },
  computed: {
    classOption() {
      return {
        step: 0.5, // 数值越大速度滚动越快
        limitMoveNum: 4, // 开始无缝滚动的数据量 this.bbsData.length
        hoverStop: false, // 是否开启鼠标悬停stop
        direction: 1, // 0向下 1向上 2向左 3向右
        openWatch: true, // 开启数据实时监控刷新dom
        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
        singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
        waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
      };
    }
  }
};
</script>

<style lang="less" scoped>
@import "../../index";
</style>
